1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Drawing;
5 using System.Data;
6 using System.Linq;
7 using System.Text;
8 using System.Threading.Tasks;
9 using System.Windows.Forms;
10
11 namespace SoftQuanLyNhaHang.Controllers
12 {
13 class LoaiThucDonCtrl
14 {
15 public static DataSet FillDataSet_getLoaiThucDonByIdLoaiThucDon(string _idLoaiThucDon)
16 {
17 try
18 {
19 Models.LoaiThucDonMod LTdon = new Models.LoaiThucDonMod(_idLoaiThucDon);
20 return LTdon.FillDataSet_getLoaiThucDonByIdLoaiThucDon();
21
22 }
23 catch
24 {
25 return null;
26 }
27 }
28 // Method Add
29 public static int InsertLoaiThucDon(string _idloaithucdon, string _tenloaithucdon, string _diengiai, string _trangthai)
30 {
31 try
32 {
33 Models.LoaiThucDonMod _lThucDon = new Models.LoaiThucDonMod(_idloaithucdon,_tenloaithucdon,_diengiai,_trangthai);
34 return _lThucDon.InsertLoaiThucDon();
35 }
36 catch
37 {
38 return 0;
39 }
40 }
41 // Method Update
42 public static int UpdateLoaiThucDon(string _idloaithucdon, string _tenloaithucdon, string _diengiai, string _trangthai)
43 {
44 try
45 {
46 Models.LoaiThucDonMod _lThucDon = new Models.LoaiThucDonMod(_idloaithucdon, _tenloaithucdon, _diengiai, _trangthai);
47 return _lThucDon.UpdateLoaiThucDon();
48 }
49 catch
50 {
51 return 0;
52 }
53
54 }
55 // Method Delete
56 public static int DeleteLoaiThucDon(string _idLoaiThucDon)
57 {
58 try
59 {
60 Models.LoaiThucDonMod _lThucDon = new Models.LoaiThucDonMod(_idLoaiThucDon);
61 return _lThucDon.DeleteLoaiThucDon();
62 }
63 catch
64 {
65 return 0;
66 }
67
68 }
69 }
70 }